# -*- coding:utf-8 -*-
# CREATED BY: jiangbohuai
# CREATED ON: 2021/4/30 5:29 PM
# LAST MODIFIED ON:
# AIM:
import pathlib
import sys

root = pathlib.Path('__file__').absolute().parents[0]
sys.path.append(root)

import numpy as np

from utility.data_loader import txt_2_numpy
from model.nomarlization import feature_scaling1D
from model.distences_formular import euclidean_distance
from model.fuzzy_rought_set import get_fuzzy_similarity,get_fuzzy_disition, get_fuzzy_lower_bounds

data_path = 'data/simple_data'
RA_path = 'data/middle_results'
# - load data - #
data = txt_2_numpy(data_path)
A = data[:, 0:-1]
D = data[:, -1::]


# --
A_n = feature_scaling1D(A, [0, 1])
#R_A = get_fuzzy_similarity(A_n)
R_A = txt_2_numpy(RA_path)
D_hat = get_fuzzy_disition(R_A, D)

lower = get_fuzzy_lower_bounds(R_A, D_hat)

print(R_A)